#ifndef MPOINT_H
#define MPOINT_H

#include "mconfig.h"
#ifdef GUI_APPLICATION

class MPoint
{
	public:
		inline MPoint() : _x(0), _y(0) {}
		inline MPoint(int x, int y) : _x(x), _y(y) {}
		inline MPoint(const MPoint &other) : _x(other._x), _y(other._y) {}

	public:
		inline int x() const { return _x; }
		inline int y() const { return _y; }

	public:
		inline void setX(int x) { _x = x; }
		inline void setY(int y) { _y = y; }
		void move(int x, int y);
		void move(const MPoint &other);

	public:
		int distanceFrom(const MPoint &other) const;

	public:
		const MPoint &operator=(const MPoint &other);

		inline bool operator==(const MPoint &other) const
		{ return _x == other._x and _y == other._y; }

		inline bool operator!=(const MPoint &other) const
		{ return _x != other._x or _y != other._y; }

	private:
		volatile int _x, _y;
};


#endif //GUI_APPLICATION

#endif //MPOINT_H
